Skip to content

fix: refresh runtime settings on change#17

Open
enieuwy wants to merge 1 commit intokavinsood:mainfrom
enieuwy:fix/settings-runtime-refresh
Open

fix: refresh runtime settings on change#17
enieuwy wants to merge 1 commit intokavinsood:mainfrom
enieuwy:fix/settings-runtime-refresh

Conversation

@enieuwy
Copy link
Copy Markdown

@enieuwy enieuwy commented Apr 13, 2026

Problem

Changing "Exclude paths" or "Max text file size" in YAOS settings had no effect until the plugin was reloaded. The onChange handlers saved the raw values to disk but never updated the runtime fields (this.excludePatterns, this.maxFileSize) used by the sync engine.

Fix

  • Extract refreshRuntimeSettings() on the plugin class — re-parses exclude patterns and recalculates max file size from settings
  • Call it from both onChange handlers in the settings tab
  • Deduplicate the onload() init to use the same method

Test plan

  • tsc --noEmit passes
  • Open YAOS settings, set exclude pattern to templates/, create a file in templates/ — confirm it is excluded from sync immediately (no reload needed)
  • Change max file size in settings — confirm new limit applies immediately

Settings onChange handlers saved the raw values but never re-parsed
them into the runtime fields used by the sync engine. Exclude patterns
and max file size only took effect after a plugin reload.

Extract refreshRuntimeSettings() and call it from both onChange handlers
and onload().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant